package com.hiwan.system.service.login;

import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hiwan.platform.util.DateUtil;
import com.hiwan.system.dao.login.LoginDao;
import com.hiwan.system.pojo.LoginInfo;

@Service
public class LogoutService{

	@Autowired
	private LoginDao loginDao;
	/**
	 * 记录用户登出时间
	 * @param loginId
	 */
	public void logout(String loginId) {
		LoginInfo loginInfo = new LoginInfo();
		loginInfo.setLoginId(loginId);
		loginInfo.setLogoutTime(DateUtil.getDateString14(new Date()));
		loginDao.update(loginInfo );
	}

}
